package com.simple.datax.transform;

import com.simple.datax.SimpleObject;
import com.simple.datax.api.TransformerException;

/** 
 * @Title: DefaultSimpleTransformer.java 
 * @Package com.simple.datax.transform 
 * @Description: TODO(添加描述) 
 * @author Paladin Chen 
 * @date 2012-12-31 下午2:40:21 
 * @version V1.0 
 */
public class DefaultSimpleTransformer implements SimpleTransformer {

	private boolean isAcceptNull = false;
	
	private boolean isIgnoreBadInput = false;
	
	private String encoding = "UTF-8";
	
	public void setAcceptNull(boolean isAcceptNull) {
		this.isAcceptNull = isAcceptNull;
	}

	public void setIgnoreBadInput(boolean isIgnoreBadInput) {
		this.isIgnoreBadInput = isIgnoreBadInput;
	}

	@Override
	public boolean isAcceptNull() {
		return isAcceptNull;
	}

	@Override
	public boolean isIgnoreBadInput() {
		return isIgnoreBadInput;
	}

	@Override
	public void transform(SimpleObject src) throws TransformerException {
		// nothing to do
	}

	@Override
	public void transform(SimpleObject src, String encoding)
			throws TransformerException {
		// nothing to do
	}

	@Override
	public String getEncoding() {
		return encoding;
	}

}
